package com.demo;

import redis.clients.jedis.Jedis;

/**
 * Created by li_wb on 2018/1/24.
 */
public class PubMain {
    public static void main(String[] arsg) throws InterruptedException {
        Jedis jedis = new Jedis("localhost", 6379);
        jedis.publish("redisChatTest", "这个是我发送的消息");
        Thread.sleep(5000);
        jedis.publish("redisChatTest", "你收到没有");
        Thread.sleep(5000);
        jedis.publish("redisChatTest", "哈哈");
    }
}
